<template>
  <div>
    <div class="qup-page-heade bread-box">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item class="btn-green" @click.native="goBack">门店整改</el-breadcrumb-item>
        <el-breadcrumb-item>{{ id?'编辑':'新增' }}</el-breadcrumb-item>
      </el-breadcrumb>
      <div>
        <el-button :loading="saveLoading" size="mini" type="primary" @click="submitForm">保存</el-button>
        <el-button size="mini" @click.native="goBack">返回</el-button>
      </div>
    </div>
    <!-- 禁用状态的输入框为带出值 -->
    <el-form
      ref="refForm"
      v-loading="dataLoading"
      style="margin-top:20px"
      :rules="formRules"
      :model="formData"
      size="mini"
      label-width="150px"
    >
      <el-row>
        <el-col :span="8">
          <el-form-item label="发起人类型:" prop="sponsorType">
            <el-select
              v-model="formData.sponsorType"
              placeholder="请选择"
              style="width: 100%"
              :disabled="formData.dataSource!=='ARTIFICIAL'"
            >
              <el-option
                v-for="item in sponsorTypeOptions"
                :key="item.dictCode"
                :label="item.dictName"
                :value="item.dictCode"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="整改发起人:" prop="">
            {{ formData.id?formData.sponsorNo: this.$store.getters.user.data.userName }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="整改发起人电话:" prop="">
            {{ formData.id?formData.sponsorPhone: this.$store.getters.user.data.phone }}
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>

        <el-col :span="8">
          <!-- 通过BPM传值的数据，默认数据来源为BPM，若界面新增，则自动填充值为“SLM” -->
          <el-form-item label="数据来源:" prop="dataSource">
            <el-select
              v-model="formData.dataSource"
              disabled
              placeholder="请选择"
              style="width: 100%"
            >
              <el-option
                v-for="item in dataSourceOptions"
                :key="item.dictCode"
                :label="item.dictName"
                :value="item.dictCode"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="流程实例号:" prop="processInstanceNo">
            <el-input v-model="formData.processInstanceNo" placeholder="——" disabled />
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="整改原因:" prop="reason">
            <el-input v-model="formData.reason" :disabled="formData.dataSource!=='ARTIFICIAL'" maxlength="1000" show-word-limit type="textarea" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>

        <el-col :span="8">
          <el-form-item label="是否下发通知:" prop="isNotice">
            <el-select
              v-model="formData.isNotice"
              placeholder="请选择"
              style="width: 100%"
              :disabled="formData.dataSource!=='ARTIFICIAL'"
            >
              <el-option label="是" :value="1" />
              <el-option label="否" :value="0" />
            </el-select>
          </el-form-item>

        </el-col>
        <el-col :span="8">
          <!-- 当“是否下发整改通知”值为是时，此字段必填 -->
          <el-form-item :rules="[{ required:formData.isNotice&&formData.dataSource==='ARTIFICIAL', message: '请填写整改通知编号' }]" label="整改通知编号:" prop="noticeCode">
            <el-input v-model="formData.noticeCode" :disabled="formData.dataSource!=='ARTIFICIAL'" maxlength="50" show-word-limit />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :rules="[{ required:formData.isNotice&&formData.dataSource==='ARTIFICIAL', message: '请选择整改通知下发时间' }]" label="整改通知下发时间:" prop="noticeIssuedTime">
            <el-date-picker
              v-model="formData.noticeIssuedTime"
              type="date"
              size="mini"
              :disabled="formData.dataSource!=='ARTIFICIAL'"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>

        <el-col :span="8">
          <el-form-item label="要求整改时间:" prop="claimTime">
            <el-date-picker
              v-model="formData.claimTime"
              type="date"
              value-format="yyyy-MM-dd HH:mm:ss"
              size="mini"
              :disabled="formData.dataSource!=='ARTIFICIAL'"
              placeholder="选择日期"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="预计卖场报图面积:" prop="shopPicArea">
            <el-input v-model.number="formData.shopPicArea" :disabled="formData.dataSource!=='ARTIFICIAL'" maxlength="4">
              <span slot="suffix">㎡</span>
            </el-input></el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="预计门头报图面积:" prop="dheadPicArea">
            <el-input v-model.number="formData.dheadPicArea" :disabled="formData.dataSource!=='ARTIFICIAL'" maxlength="4">
              <span slot="suffix">㎡</span>
            </el-input></el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item label="预计开业时间:" prop="expectOpenTime">
            <el-date-picker
              v-model="formData.expectOpenTime"
              type="date"
              :disabled="formData.dataSource!=='ARTIFICIAL'"
              value-format="yyyy-MM-dd HH:mm:ss"
              size="mini"
              placeholder="选择日期"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="未整改考核措施:" prop="assessmentMeasures">
            <el-select
              v-model="formData.assessmentMeasures"
              placeholder="请选择"
              :disabled="formData.dataSource!=='ARTIFICIAL'"
              style="width: 100%"
            >
              <el-option
                v-for="item in measuresOptions"
                :key="item.dictCode"
                :label="item.dictName"
                :value="item.dictCode"
              />
            </el-select>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="门店:" prop="shopCode">
            <input-with-dialog
              v-model="shop"
              :disabled="formData.dataSource!=='ARTIFICIAL'"
              :props="{label:'name',value:'code'}"
              :config="dialogConfigStore"
              @change="handleChangeStore"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="门店编码:" prop="shopCode">
            <el-input v-model="formData.shopCode" placeholder="——" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="所属办事处:" prop="officeName">
            <el-input v-model="formData.officeName" placeholder="——" disabled />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="客户编码:" prop="customerCode">
            <el-input v-model="formData.customerCode" placeholder="——" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="所属客户:" prop="customerName">
            <el-input v-model="formData.customerName" placeholder="——" disabled />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="门店营业状态:" prop="shopBizState">
            <el-select
              v-model="formData.shopBizState"
              placeholder="——"
              disabled
              style="width: 100%"
            >
              <el-option
                v-for="item in bizOptions"
                :key="item.dictCode"
                :label="item.dictName"
                :value="item.dictCode"
              />
            </el-select>
            <!-- <el-input v-model="formData.shopBizState" placeholder="——" disabled /> -->
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="客户营业状态:" prop="customerBizState">
            <el-select
              v-model="formData.customerBizState"
              placeholder="——"
              disabled
              style="width: 100%"
            >
              <el-option
                v-for="item in bizOptions"
                :key="item.dictCode"
                :label="item.dictName"
                :value="item.dictCode"
              />
            </el-select>
            <!-- <el-input v-model="formData.customerBizState" placeholder="——" disabled /> -->
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="门店停业时间:" prop="shopClosedTime">
            <el-input
              v-model="formData.shopClosedTime"
              disabled
              size="mini"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="——"
            />
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="客户取缔时间:" prop="customerBanTime">
            <el-input
              v-model="formData.customerBanTime"
              disabled
              value-format="yyyy-MM-dd HH:mm:ss"
              size="mini"
              placeholder="——"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="成品销售冻结:" prop="proSaleFreeze">
            <el-select
              v-model.number="formData.proSaleFreeze"
              style="width: 100%"
              placeholder="——"
              disabled
            >
              <el-option label="是" :value="1" />
              <el-option label="否" :value="0" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <!-- 根据门店编码自动带出 -->
          <el-form-item label="定制销售冻结:" prop="customizeSaleFreeze">
            <el-select
              v-model.number="formData.customizeSaleFreeze"
              disabled
              placeholder="——"
              style="width: 100%"
            >
              <el-option label="是" :value="1" />
              <el-option label="否" :value="0" />
            </el-select>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>

        <el-col :span="8">
          <el-form-item label="门店建设项目号:" prop="constCode">
            <input-with-dialog
              v-model="construction"
              placeholder="请输入门店建设项目号"
              :props="{label:'constCode',value:'constCode'}"
              :config="dialogConfigConst"
              @change="handleChangeConst"
            />
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <!-- 根据门店建设项目号自动带出 -->
          <el-form-item label="门店建设进度:" prop="constSchedule">
            <el-select
              v-model="formData.constSchedule"
              placeholder="请选择"
              style="width: 100%"
              disabled
            >
              <el-option
                v-for="item in constScheduleOptions"
                :key="item.dictCode"
                :label="item.dictName"
                :value="item.dictCode"
              />
            </el-select>
            <!-- <el-input v-model="formData.constSchedule" placeholder="——" disabled /> -->
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item label="实际处理结果:" prop="actualProcessResult">
            <el-select
              v-model="formData.actualProcessResult"
              placeholder="请选择"
              style="width: 100%"
            >
              <el-option
                v-for="item in actualResultOptions"
                :key="item.dictCode"
                :label="item.dictName"
                :value="item.dictCode"
              />
            </el-select>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col v-if="id" :span="8">
          <!-- 取设计申请审核通过时间 -->
          <el-form-item label="实际整改达成时间:" prop="actualReachTime">
            <el-date-picker
              v-model="formData.actualReachTime"
              type="date"
              size="mini"
              :picker-options="pickerOptions"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期"
              @change="changeActualReachTime"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="店面整改是否完成:" prop="isEnd">
            <el-radio-group v-model="formData.isEnd">
              <el-radio :label="1">是</el-radio>
              <el-radio :label="0">否</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="跟进情况反馈:" prop="followFeedback">
            <el-input v-model="formData.followFeedback" maxlength="1000" show-word-limit placeholder="请填写跟进情况反馈" type="textarea" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <!-- 附件上传 -->
    <div
      v-for="item in fileTypeList"
      :key="item.id"
    >
      <div class="qup-title-box"><span class="border" /><span>附件上传-{{ item.attachmentType }}</span></div>
      <import-file
        :data="item.fileList"
        :file-type="item.fileTypeName"
        :config-attachment-id="item.id||''"
        :limit="20"
        @remove="changeFile"
        @upload-success="changeFile"
      />
    </div>
  </div>
</template>
<script>
import importFile from '@/components/importFile'
import { getDictByPatchType } from '@/api/dataDict'
import { getShopAttachment, searchCustomer, searchBizAccount, searchManagerAccount } from '@/api/common.js'
import { queryById, postConfigAttachmentTemplate, saveUpgrade } from '@/api/shopUpgrade'
import BackPageMixin from '@/mixins/backPage'
export default {
  name: 'EditStoreUpgrade',
  components: { importFile },
  mixins: [BackPageMixin],
  props: {
    id: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      dataLoading: false,
      saveLoading: false,
      fileTypeList: [],
      fileList: [],
      construction: [],
      shop: [],
      fileLength: 0, // 升级改造附件数量
      sponsorTypeOptions: [], // 发起人类型
      dataSourceOptions: [], // 数据来源
      measuresOptions: [], // 未整改措施
      bizOptions: [], // 营业状态
      shopBizOptions: [], // 门店营业状态
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now()
        } },
      formRules: {
        sponsorType: [
          { required: true, message: '请选择发起人类型', trigger: 'change' }
        ],
        dataSource: [
          { required: true, message: '请选择数据来源', trigger: 'change' }
        ],
        reason: [
          { required: true, message: '请填写整改原因', trigger: 'change' }
        ],
        isNotice: [
          { required: true, message: '请选择是否下发通知', trigger: 'change' }
        ],
        claimTime: [
          { required: true, message: '请选择要求整改时间', trigger: 'change' }
        ],
        shopPicArea: [
          { required: true, message: '请填写预计卖场报图面积', trigger: 'change' },
          { pattern: /^[0-9]+$/, message: '只能输入数字' }
        ],
        dheadPicArea: [
          { required: true, message: '请填写预计门头报图面积', trigger: 'change' },
          { pattern: /^[0-9]+$/, message: '只能输入数字' }
        ],
        expectOpenTime: [
          { required: true, message: '请选择预计开业时间', trigger: 'change' }
        ],
        assessmentMeasures: [
          { required: true, message: '请填写未整改考核措施', trigger: 'change' }
        ],
        shopCode: [
          { required: true, message: '请选择门店', trigger: 'change' }
        ],
        constCode: [
          { required: false, message: '请选择门店建设项目号', trigger: 'change' }
        ],
        actualProcessResult: [
          { required: false, message: '请选择实际处理结果', trigger: 'change' }
        ],
        actualReachTime: [
          { required: false, message: '请选择实际整改达成时间', trigger: 'change' }
        ],
        followFeedback: [
          { required: false, message: '请填写跟进情况反馈', trigger: 'change' }
        ]
      },
      dialogConfigStore: {
        title: '门店',
        interfacePath: `/select-service/api/v1/shop/page`,
        filtersRaw: [{ 'id': 'status', 'property': 'status', 'value': '1', 'operator': '=' }],
        setting: [{ prop: 'code', title: '编码' }, { prop: 'name', title: '名称' }]
      },
      dialogConfigConst: {
        title: '门店建设项目号',
        // paramField: 'constCode',
        filtersRaw: [],
        interfacePath: `${process.env.VUE_APP_BASE_API}/api/v1/shopConstruct/page`,
        setting: [{ prop: 'constCode', title: '门店建设项目号' }, { prop: 'shopName', title: '门店名称' }, { prop: 'shopCode', title: '门店编码' }]
      },
      formData: {
        actualProcessResult: '', // 实际处理结果：整改、销售冻结、门店取缔
        actualReachTime: '', // 实际达成时间
        assessmentMeasures: '', // 未整改考核措施:：整改、销售冻结、门店取缔
        claimTime: '', // 要求整改时间
        constCode: '', // 门店建设号
        isEnd: 0,
        constSchedule: '', // 门店建设进度
        customerBanTime: '', // 客户取缔时间
        customerBizState: '', // 客户营业状态
        customerCode: '', // 所属客户编码
        customerName: '', // 所属客户名称
        customizeSaleFreeze: undefined, // 定制销售冻结：0否1是
        dataSource: 'ARTIFICIAL', // 数据来源：BPM、 SLM
        dheadPicArea: '', // 预计门头报图面积
        expectOpenTime: '', // 预计开业时间
        followFeedback: '', // 跟进情况反馈
        isNotice: 0, // 是否下达整改通知0否1是
        noticeCode: '', // 整改通知编号
        noticeIssuedTime: '', // 整改通知下发时间
        officeCode: '', // 所属办事处编码
        officeName: '', // 所属办事处名称
        proSaleFreeze: undefined, // 成品销售冻结：0否1是
        processInstanceNo: '', // 流程实例号
        reason: '', // 整改原因
        rectifyCode: '', // 门店整改编号
        shopAttachmentDTOList:	[],
        shopBizState: '', // 门店营业状态
        shopClosedTime: '', // 门店停业时间
        shopCode: '', // 门店编码
        shopName: '', // 门店名称
        shopPicArea: '', // 预计卖场报图面积
        sponsorNo: '', // 整改发起人编码
        sponsorPhone: '', // 整改发起人电话
        sponsorType: ''// 发起人类型：客户经理、渠道跟进、公司政策
      }

    }
  },
  watch: {
    'formData.shopCode'(v) {
      if (v) this.dialogConfigConst.filtersRaw = [{ 'id': 'shopCode', 'property': 'shopCode', 'value': v, 'operator': '=' }] // 门店建设项目号筛选
      else this.dialogConfigConst.filtersRaw = []
    }
  },
  async created() {
    await postConfigAttachmentTemplate().then(res => {
      if (res.success === 1 && res.data.records.length > 0) {
        // 根据modelId获取每个配置id
        this.fileTypeList = res.data.records.filter(el => el.enable === 1)
        this.fileTypeList.forEach(row => {
          this.$set(row, 'fileList', [])
        })
      }
    })
    if (this.id) {
      this.dataLoading = true
      this.getFiles()// 获取文件，图片列表
      await queryById(this.id).then(res => {
        if (res.success === 1) {
          this.formData = res.data
          if (!this.formData.isEnd) this.$set(this.formData, 'isEnd', 0)
          this.dataLoading = false
        }
      }).catch(() => {
        this.dataLoading = false
      })
    }
    this.construction = [{ constCode: this.formData.constCode }]
    this.shop = [{ code: this.formData.shopCode, name: this.formData.shopName }]
    this.getDictByPatchTypeAll()
  },
  methods: {
    // 获取附件
    getFiles() {
      getShopAttachment(this.id).then(res => {
        this.fileTypeList.forEach(row => {
          row.fileList = res.data.filter(i => i.configAttachmentId === row.id)
          if (row.attachmentType === '升级改造附件') { this.fileLength = row.fileList.length }
        })
      })
    },
    changeActualReachTime(data) {
      if (data) this.formData.isEnd = 1
      else this.formData.isEnd = 0
    },
    // 监听门店数据变化
    handleChangeStore(data) {
      if (data.length !== 0) {
        this.formData.shopCode = data[0].code// 门店编码
        this.formData.shopName = data[0].name// 门店名称
        this.formData.customerName = data[0].customerName// 所属客户
        this.formData.customerCode = data[0].customerCode// 所属客户
        this.formData.officeName = data[0].agencyName// 所属办事处
        this.formData.officeCode = data[0].agencyCode// 所属办事处
        this.formData.shopBizState = data[0].businessStatus// 门店营业状态
        this.formData.shopClosedTime = data[0].stopTime || ''// 门店停业时间
        // 根据门店下的客户code查询 对应的经销商信息
        searchCustomer(data[0].customerCode, 'storeupgrade').then(res => {
          if (res.success === 1 && res.data.records.length > 0) {
            this.formData.customerBizState = res.data.records[0].businessStatus || undefined// 客户营业状态
            this.formData.customerBanTime = data[0].stopTime || ''// 客户取缔时间
          }
        })
        // 根据门店下的客户code查询 对应的业务账号类型信息 通过业账号查找冻结信息
        searchBizAccount(data[0].customerCode, 'storeupgrade').then(res => {
          if (res.success === 1) {
            if (res.data) {
              res.data.records.map(el => {
                if (el.accountTypeCode === '1') {
                  searchManagerAccount(el.code).then(res => {
                    this.formData.customizeSaleFreeze = res.data.records[0].soState
                  })
                }
                if (el.accountTypeCode === '2') {
                  searchManagerAccount(el.code).then(res => {
                    this.formData.proSaleFreeze = res.data.records[0].soState
                  })
                }
              })
            }
          }
        })
        this.$refs.refForm.validateField('shopCode')
      } else {
        this.formData.shopCode = ''// 门店编码
        this.formData.shopName = ''// 门店名称
        this.formData.customerName = ''// 所属客户
        this.formData.officeName = ''// 所属办事处
        this.formData.officeCode = ''// 所属办事处
        this.formData.customerCode = ''// 所属客户
        this.formData.shopBizState = ''// 门店营业状态
        this.formData.customerBizState = ''// 客户营业状态
        this.formData.shopClosedTime = ''// 门店停业时间
        this.formData.customerBanTime = ''// 客户取缔时间
        this.formData.proSaleFreeze = ''// 成品销售冻结
        this.formData.customizeSaleFreeze = ''// 定制销售冻结
      }
    },
    submitForm() {
      this.$refs['refForm'].validate((valid) => {
        if (valid) {
          if (!this.formData.actualProcessResult) this.$set(this.formData, 'actualProcessResult', 'NONE')
          this.$set(this.formData, 'shopAttachmentDTOList', [])
          this.fileTypeList.forEach(row => {
            this.formData.shopAttachmentDTOList.push(...row.fileList)
          })
          if (this.fileLength === 0) {
            this.$message.warning('请上传升级改造附件')
            return
          }
          // const tempArr = this.formData.shopAttachmentDTOList.filter(el => el.dr === 0)
          // if (tempArr.length === 0) {
          //   this.$message.warning('请上传升级改造附件')
          //   return
          // }
          this.saveLoading = true
          if (!this.formData.id) {
            this.$set(this.formData, 'sponsorNo', this.$store.getters.user.data.account)
            this.$set(this.formData, 'sponsorPhone', this.$store.getters.user.data.phone)
          }
          saveUpgrade(this.formData).then(res => {
            if (res.success === 1) {
              this.$message({
                message: this.formData.id ? '编辑成功' : '新增成功',
                type: 'success'
              })
              this.goBack()
              const isNew = !this.formData.id // 是否新增数据 true (新增则刷新列表到第一页)/ false (非新增则刷新当前页)
              this.$emit('success', isNew)
              this.saveLoading = false
            }
          }).catch(() => {
            this.saveLoading = false
          })
        }
      })
    },
    // 删除文件
    removeFile(data) {
      this.fileList = data.list
    },
    // 文件上传成功
    changeFile(data) {
      this.fileLength = data.fileLength
      this.fileList = data.list
    },
    async getDictByPatchTypeAll() {
      const { BEFORE_CONST_SCHEDULE, SHOP_BIZ_STATE, SPONSOR_TYPE, DATA_FROM, ASSESSMENT_MEASURES, ACTUAL_PROCESS_RESULT } =
       await getDictByPatchType(['BEFORE_CONST_SCHEDULE', 'SHOP_BIZ_STATE', 'SPONSOR_TYPE', 'DATA_FROM', 'ASSESSMENT_MEASURES', 'ACTUAL_PROCESS_RESULT'])
      this.sponsorTypeOptions = SPONSOR_TYPE
      this.bizOptions = SHOP_BIZ_STATE
      this.dataSourceOptions = DATA_FROM
      this.constScheduleOptions = BEFORE_CONST_SCHEDULE
      this.measuresOptions = ASSESSMENT_MEASURES
      this.actualResultOptions = ACTUAL_PROCESS_RESULT
    },
    handleChangeAgency() {

    },
    // 门店信息改变
    handleChangeShop() {

    },
    // 门店建设项目号改变
    handleChangeConst(data) {
      if (data.length !== 0) {
        this.formData.constCode = data[0].constCode// 门店建设项目号
        this.formData.constSchedule = data[0].constSchedule// 门店建设进度
      }
    }

  }
}
</script>
<style lang="scss" scoped>
/deep/ .el-breadcrumb__inner{
    color: $qup-color-primary;
  }
</style>
